<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
</head>

<body>
    <script>
            let arr = ["America", "Greece", "Britain", "Canada", "China", "Egypt"]
            let a = 0
            let b = 0;
            for (let i = 0; i < arr.length; i++) {
                for (let j = 0; j < arr[i].length; j++) {
                    if (arr[i][j] == 'a' || arr[i][j] == 'A') {
                        a++
                        break
                    }
                }
            }
            document.writeln(a)
            for (let i in arr) {
                if (arr[i].indexOf('a') != -1 || arr[i].indexOf('A') != -1) {
                    b++
                }
            }
            document.writeln(b)
        
    </script>
</body>

</html>